<html>
<head><meta charset="utf-8"><title>RBG crate · project-safe-transmute · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/index.html">project-safe-transmute</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html">RBG crate</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200908407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200908407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200908407">(Jun 15 2020 at 15:50)</a>:</h4>
<p>So there's a soundness bug in <code>rgb</code> crate where it accepted any data instead of just data for which any bit pattern is valid: <a href="https://github.com/kornelski/rust-rgb/issues/35">https://github.com/kornelski/rust-rgb/issues/35</a><br>
They've hotfixed it by using the <code>plain</code> crate: <a href="https://github.com/kornelski/rust-rgb/commit/2691083fa864200830bf9dce7fc890f594e3e402">https://github.com/kornelski/rust-rgb/commit/2691083fa864200830bf9dce7fc890f594e3e402</a><br>
The interesting part is, <code>rgb</code> positions itself as the "one RGB struct to rule them all" so that we don't end up with 5 different incompatible ones, and yet it still ended up with 5 incompatible traits for expressing the "any bit pattern is valid" rule.</p>



<a name="200924305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200924305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200924305">(Jun 15 2020 at 17:59)</a>:</h4>
<p>Yep.</p>
<p>That's one of the fundamentals we'd need for sure.</p>



<a name="200925238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200925238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kornel <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200925238">(Jun 15 2020 at 18:08)</a>:</h4>
<p>Hi</p>



<a name="200925361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200925361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kornel <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200925361">(Jun 15 2020 at 18:09)</a>:</h4>
<p>The <code>plain</code> dependency is not ideal. I'd like to use some more "official" trait for this.</p>



<a name="200925464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200925464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Kornel <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200925464">(Jun 15 2020 at 18:10)</a>:</h4>
<p>I don't need any higher-level safe transmute. Just a marker trait for PoD types.</p>



<a name="200927409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200927409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200927409">(Jun 15 2020 at 18:26)</a>:</h4>
<p>I don't think mem-markers is official as of yet. The desired set of traits is still being figured out too, so API breaks a possibility. What's the status of the proposed 0.1 release?</p>



<a name="200928773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/RBG%20crate/near/200928773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/RBG.20crate.html#200928773">(Jun 15 2020 at 18:39)</a>:</h4>
<p>"work slowed by the global situation"</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>